package com.zky.gulimall.search.vo;

import com.google.common.collect.Lists;
import com.zky.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.List;

/**
 * @Description 检索响应结果
 * @Author 张开源
 * @Date 2022/11/9 9:48
 * @Version 1.0
 **/
@Data
public class SearchResult {

    /**
     * 商品信息
     */
    private List<SkuEsModel> products;
    /**
     * 当前页码
     */
    private Integer pageNum;
    /**
     * 导航页码
     */
    private List<Integer> pageNavs;

    /**
     * 面包屑导航
     */
    private List<NavVo> navs= Lists.newArrayList();

    /**
     * 筛选的顺属性id
     */
    private List<Long> attrIds= Lists.newArrayList();

    /**
     * 总记录数
     */
    private Long total;

    /**
     * 总页数
     */
    private Long totalPages;
    /**
     * 品牌信息
     */
    private List<BrandVo> brands;
    /**
     * 分类信息
     */
    private List<CatalogVo> catalogs;

    /**
     * 属性
     */
    private List<AttrVo> attrs;



    @Data
    public static class NavVo {

        private String navName;

        private String navValue;

        private String link;
    }


    @Data
    public static class BrandVo {

        private Long brandId;

        private String brandName;

        private String brandImg;
    }

    @Data
    public static class AttrVo {

        private Long attrId;

        private String attrName;

        private List<String> attrValue;
    }

    @Data
    public static class CatalogVo {

        private Long catalogId;

        private String catalogName;
    }


}
